import http from '@/common/js/httpRequest'
//获取职位列表
export function getPositionList (params) {
  return http({
    method: 'get',
    url: '/api/sys/position/list',
    params
  })
}
//新增或修改职位
export function saveOrUpdatePosition (data) {
	const url = !data.positionId ? '/api/sys/position/save' : '/api/sys/position/update'
  return http({
    method: 'post',
    url: url,
    data
  })
}
//删除职位
export function deletePosition (ids) {
  return http({
    method: 'post',
    url: '/api/sys/position/delete',
    data: ids,
    openDefultdata: true
  })
}